<template>
  <div id="roleAuthorityManagement" class="fit">
    <ta-tabs @tabClick="onRadioClick" :activeKey="value" class="tab-style">
      <ta-tab-pane key="1" tab="角色维度"></ta-tab-pane>
      <ta-tab-pane key="2" tab="人员维度"></ta-tab-pane>
    </ta-tabs>
    <div style="height: calc(100% - 59px)">
      <router-view></router-view>
    </div>
  </div>
</template>
<script>

  export default{
    name:"roleAuthorityManagement",
    data(){
      return {
        value: '1',
      }
    },
    methods:{
      onRadioClick(key){
        this.value = key;
        if(key==1){
          this.$router.push({name:'publicRoleManager'})
        }else if(key==2){
          this.$router.push({name:'userRole'})
        }
      }
    },
    // created(){
    //   if(this.$route.name!='publicRoleManager'){
    //     this.$router.push({name:'publicRoleManager'})
    //   }
    // },
    activated(){
      if(this.$route.name==="publicRoleManager"){
        this.value = '1';
      }else if(this.$route.name==="userRole"){
        this.value='2';
      }
    }
  }
</script>
<style type="text/scss" lang="scss" scoped>
  #roleAuthorityManagement { border: 14px solid #f0f2f5 }
  .tab-style {height: 59px; border-bottom: 0;}
</style>
